# 创建类  三要素：类名、属性、方法

class Cat():
    def __init__(self, name):
        self.name = name

    def jump(self):
        print(self.name+"is jumping")


# myCat = Cat("xiaoming")
# yourCat = Cat("xiaoming111")

# print(myCat.name)
# myCat.jump()
# print(yourCat.name)
# yourCat.jump()


# 继承  class 子类(父类)
class OrangeCat(Cat):
    def __init__(self, name):
        super().__init__(name)

    def swim(self):
        print(self.name+"is swimming")
    #多态重写
    def jump(self):
        print(self.name+"is jumping........")

orangeCat = OrangeCat("小菊")
print(orangeCat.name)
orangeCat.jump()
orangeCat.swim()
